import request from '@/utils/request'

// 列表
export function search(query) {
  console.log('请求参数：', query)
  return request({
    url: '/admin/api/sys/admin/search'
    , method: 'post'
    , data: query
    , apiDataEncrypt: true
  })
}

// 移入回收站
export function recycle(ids) {
  return request({
    url: '/admin/api/sys/admin/recycle/' + ids
    , method: 'delete'
  })
}

// 删除
export function dels(ids) {
  return request({
    url: '/admin/api/sys/admin/' + ids
    , method: 'delete'
  })
}

// 启用
export function enable(id) {
  return request({
    url: '/admin/api/sys/admin/enable/' + id
    , method: 'put'
  })
}

// 禁用
export function disable(id) {
  return request({
    url: '/admin/api/sys/admin/disable/' + id
    , method: 'put'
  })
}
